package com.hongning.railway.data.http.service;

import com.hongning.railway.entity.DemoEntity;
import com.hongning.railway.entity.LoginEntity;
import com.hongning.railway.entity.UserEntity;
import com.hongning.railway.entity.reqbean.QuestionResultBean;
import com.hongning.railway.entity.reqbean.QuestionResultListBean;
import com.hongning.railway.entity.reqbean.ReqAssessesIntegralBean;
import com.hongning.railway.entity.reqbean.RosterMainBean;
import com.hongning.railway.entity.reqbean.ThreesessionSanDoneLessonBean;
import com.hongning.railway.entity.reqbean.ReqNewsBean;
import com.hongning.railway.entity.resbean.BaseRes;
import com.hongning.railway.entity.resbean.BaseResCadreListBean;
import com.hongning.railway.entity.resbean.BaseResExam;
import com.hongning.railway.entity.resbean.DataBeanX;
import com.hongning.railway.entity.resbean.Fileterbean;
import com.hongning.railway.entity.resbean.NewsCategoryBean;
import com.hongning.railway.entity.resbean.ResAnswerCheck;
import com.hongning.railway.entity.resbean.ResAnswerSubmitBean;
import com.hongning.railway.entity.resbean.ResCadreBean;
import com.hongning.railway.entity.resbean.ResDetailScore;
import com.hongning.railway.entity.resbean.ResDynamicBean;
import com.hongning.railway.entity.resbean.ResExamCompleteBean;
import com.hongning.railway.entity.resbean.ResExamItem;
import com.hongning.railway.entity.resbean.ResExperienceBean;
import com.hongning.railway.entity.resbean.ResKaoHeBean;
import com.hongning.railway.entity.resbean.ResKaoHeListBean;
import com.hongning.railway.entity.resbean.ResListScoreDetailBean;
import com.hongning.railway.entity.resbean.ResMemberInfo;
import com.hongning.railway.entity.resbean.ResNewsBean;
import com.hongning.railway.entity.resbean.ResNewsDetail;
import com.hongning.railway.entity.resbean.ResOptionBean;
import com.hongning.railway.entity.resbean.ResPhotoItem;
import com.hongning.railway.entity.resbean.ResScoreRankBean;
import com.hongning.railway.entity.resbean.ResScoreRankInfo;
import com.hongning.railway.entity.resbean.ResVideoBean;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import me.goldze.mvvmhabit.http.BaseResponse;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
import retrofit2.http.Url;

/**
 * Created by goldze on 2017/6/15.
 */

public interface ApiService {
    @GET("action/apiv2/banner?catalog=1")
    Observable<BaseResponse<DemoEntity>> demoGet();

    @FormUrlEncoded
    @POST("action/apiv2/banner")
    Observable<BaseResponse<DemoEntity>> demoPost(@Field("catalog") String catalog);

//    @POST("api/login")
    @FormUrlEncoded
    @POST("api/loginForApp")
    Observable<BaseResponse<LoginEntity>> userLogin(@Field("userName") String username, @Field("password") String password);

    //编辑用户信息
    @POST("/nbfp/staffInfo/updateStaffInfo")
    Observable<BaseResponse<LoginEntity>> updateStaffInfo(@Body RequestBody info);

    /**
     * 新闻类别
     */
    @POST("newsType/getIdAndTypeNameByModuleIdAndTypeStatus")
    Observable<BaseResponse<List<NewsCategoryBean>>> getCategorys(@Body RequestBody info); /**
     /*
     * 新闻类别
     */
    @POST("news/getAllNewsList")
    Observable<BaseResponse<DataBeanX>> getNews(@Body RequestBody info);


    /**
     * 获取动态列表
     */
    @POST("albums/getAllAlbumsHomePage")
    Observable<BaseResponse<DataBeanX>> getAllAlbumsHomePage(@Body RequestBody info);

    /**
     * 获取首页banner推荐的
     */
    @POST("news/getNewsTopList")
    Observable<BaseResponse<List<ResNewsBean>>> getBannerData(@Body RequestBody info);

    /**
     * 动态列表信息
     */
    @POST("news/getNewsDynamicList")
    Observable<BaseResponse<ResDynamicBean>> getNewsDynamicList(@Body RequestBody info);


    /**
     * 详情信息
     */
    @POST("news/getNewsByNewsId")
    Observable<BaseResponse<ResNewsDetail>> getNewsDetail(@Body RequestBody info);


    @POST("albums/getAlbumsListByPhotoAlbumsId")
    Observable<BaseResponse<BaseRes<List<ResPhotoItem>>>> getDynamicPhotos(@Body RequestBody data);


    /**
     * 视频信息列表
     */
    @POST("news/getPartyLectureListForApp")
    Observable<BaseResponse<BaseRes<List<ResVideoBean>>>> getVideoList(@Body RequestBody data);


    @GET("/nbfp/api/logout")
    Observable<BaseResponse> userLogOut();


    /**
     * 在线考试未完成
     */
    @POST("paper/applist")
    Observable<BaseResponse<BaseResExam<ResExamItem>>> getExamList(@Body RequestBody data);


    /**
     * 考试已完成列表result/list
     */
    @POST("result/list")
    Observable<BaseResponse<List<ResExamCompleteBean>>> getExamCompleteList(@Body RequestBody data);


    /**
     * 考试已完成列表result/list
     */
    @POST("questions/list")
    Observable<BaseResponse<BaseResExam<ResOptionBean>>> getquestionslist(@Body RequestBody data);



    //    Observable<BaseResponse<ThreesessionSanDoneLessonBean>> selectmeet(@Url String url,@Field("userid") String userid, @Field("pagenum") int pagenum, @Field("pagesize") int pagesize, @Field("meetingname") String meetingname, @Field("meetingtype") String meetingtype, @Field("signcolumn") String signcolumn);
//    http://47.108.73.33:8080/nbfp/result/insert
    @POST("result/insert")
    Observable<BaseResponse<ResAnswerSubmitBean>> answerSubmit(@Body RequestBody requestBody);

    /**
     * 答题结果
     * @param requestBody
     * @return
     */
    @POST("ques_result/list")
    Observable<BaseResponse<BaseResExam<ResAnswerCheck>>> answerCheck(@Body RequestBody requestBody);

    //三会一课更新状态
    @POST("/Inform/updatesign")
    Observable<BaseResponse> updatesign(@Body RequestBody requestBody);

    /**
     * 三会一课列表
     * @param
     * @param
     * @param
     * @param
     * @param
     * @return
     */
    @POST("/nbfp/Inform/selectmessage")//
    Observable<BaseResponse<ThreesessionSanDoneLessonBean>> selectmeet(@Body RequestBody data);

    //获取三会一课消息
    @POST("/nbfp/Inform/selectMessage")
    Observable<BaseResponse<List<ThreesessionSanDoneLessonBean.DataBean>>> selectMessage(@Body RequestBody requestBody);


    /**
     *pageViews/addPageViews
     * 添加浏览记录 点赞接口
     */
    @POST("pageViews/updatePageViewsIsLike")
    Observable<BaseResponse> addPageViewAndPraise(@Body RequestBody requestBody);


    /**
     * menu/getStaffMenu
     * 獲取個人中心菜單
     */
    @POST("menu/getStaffMenu")
    Observable<BaseResponse> getMenu(@Body RequestBody requestBody);


    /**
     * 获取干部管理花名册列表
     * @param requestBody
     * @return
     */
    @POST("/nbfp/cadre/selectCadreList")
    Observable<BaseResponse<RosterMainBean>> selectCadreList(@Body RequestBody requestBody);


    /**
     *干部测评列表
     * @param requestBody
     * @return
     */

    @POST("cadresTestInfo/selectTestInfo")
    Observable<BaseResponse<BaseResCadreListBean<ResCadreBean>>> getCadreMemberList(@Body RequestBody requestBody);

    /**
     * cadre/selectCadrePersonnel
     * 干部测评人员信息
     */
    @POST("cadresTestScore/selectCadrePersonnel")
    Observable<BaseResponse<List<ResMemberInfo>>> getCadreMemberStudentList(@Body RequestBody requestBody);

    /**
     * cadre/selectCadrePersonnel
     * 提交干部测评消息
     */
    @POST("CadresAssesses/addAssesses")
    Observable<BaseResponse<String>> submitCadreMember(@Body RequestBody requestBody);

    /**
     * cadre/selectCadrePersonnel
     * 提交干部测评消息
     */
    @POST("CadresAssesses/addSaveAssesses")
    Observable<BaseResponse<String>> addSaveAssesses(@Body RequestBody requestBody);


    /**
     * /score/selectScore
     * 获取积分详情列表
     */
    @POST("score/selectScoreDetail")
    Observable<BaseResponse<ResDetailScore>> getScoreDetail(@Body RequestBody requestBody);

    /**
     * 获取积分总体信息
     */
    @POST("score/selectScore")
    Observable<BaseResponse<ResScoreRankInfo>> getScoreRankInfo(@Body RequestBody requestBody);


    /**
     * 获取积分排行信息
     */
    @POST("score/selectScoreRank")
    Observable<BaseResponse<ResScoreRankInfo>> getScoreRank(@Body RequestBody requestBody);


    /**
     * 添加积分
     */
    @POST("score/addScore")
    Observable<BaseResponse<String>> addScore(@Body RequestBody requestBody);

    /**
     * 添加积分
     */
    @POST("score/addScoreForExam")
    Observable<BaseResponse<String>> addScoreForExam(@Body RequestBody requestBody);

    /**
     * 总积分排行
     */
    @POST("score/rankTotleScore")
    Observable<BaseResponse<List<ResScoreRankBean>>> allrankScore(@Body RequestBody requestBody);


    /**
     * 总积分排行
     */
    @POST("score/rankGroupScore")
    Observable<BaseResponse<List<ResScoreRankBean>>> zhiburankScore(@Body RequestBody requestBody);


    /**
     * 红宁总积分排行
     */
    @POST("score/rankHNScore")
    Observable<BaseResponse<List<ResScoreRankBean>>> allHnrankScore(@Body RequestBody requestBody);


    /**
     * 支部红宁积分排行
     */
    @POST("score/rankGroupHNScore")
    Observable<BaseResponse<List<ResScoreRankBean>>> zhibuhnrankScore(@Body RequestBody requestBody);


    /**
     * 添加新的心得体会
     */
    @POST("experience/addExperience")
    Observable<BaseResponse<Boolean>> addExperience(@Body RequestBody requestBody);

    /**
     * 心得体会列表
     */
    @POST("experience/selectExperience")
    Observable<BaseResponse<ResExperienceBean>> selectExperience(@Body RequestBody requestBody);


    /**
     * 心得体会列表
     */
    @POST("experience/updateExperience")
    Observable<BaseResponse<Boolean>> updateExperience(@Body RequestBody requestBody);


    /**
     * 党员互评查询接口
     */
    @POST("integral/selectAssessesIntegral")
    Observable<BaseResponse<List<QuestionResultBean>>> selectAssessesIntegral(@Body RequestBody requestBody);

    /**
     * 党员互评提交
     */
    @POST("integral/addAssessesIntegral")
    Observable<BaseResponse<String>> addAssessesIntegral(@Body RequestBody requestBody);

    /**
     * 党员互评保存
     */
    @POST("integral/saveAssessesIntegral")
    Observable<BaseResponse<String>> saveAssessesIntegral(@Body RequestBody requestBody);

    /**
     * .查询用户考核信息列表 sad
     */
    @POST("/nbfp/countScore/selectStatisticsByPage")
    Observable<BaseResponse<QuestionResultListBean>> selectStatisticsByPage(@Body RequestBody requestBody);

    /**
     * 查询互评详情
     * @param requestBody
     * @return
     */
    @POST("/nbfp/integral/selectAssessesIntegralById")
    Observable<BaseResponse<ReqAssessesIntegralBean>> selectAssessesIntegralById(@Body RequestBody requestBody);

    /**
     * 党建考核列表信息
     */
    @POST("partyExamInfo/getPartyExamInfoListForApp")
    Observable<BaseResponse<List<ResKaoHeBean>>> getPartyExamInfoListForApp(@Body RequestBody requestBody);


    /**
     * 党建考核二级列表信息
     */
    @POST("partyExamInfo/getPartyExamInfoDetailsById")
    Observable<BaseResponse<List<ResKaoHeBean>>> getPartyExamInfoDetailsById(@Body RequestBody requestBody);



    /**
     * 干部管理 考核列表  二级列表
     */
    @POST("cadresTestScore/selectTestScoreAPP")
    Observable<BaseResponse<ResKaoHeListBean>> selectTestScoreAPP(@Body RequestBody requestBody);

    /**
     * 获取筛选列
     */
    @GET("/nbfp/newsType/getTypesForApp")
    Observable<BaseResponse<List<Fileterbean>>> getTypesForApp();
    /**
     * /news/addPageView
     */

    @POST("news/addPageView")
    Observable<BaseResponse> addPageView(@Body RequestBody requestBody);

}
